			//将完整日期显示到input
			function KO_ForInput(e){
				var yearandmonth = encodeURI($("#yearandmonth").text());
				var dateValue = yearandmonth+"-"+e.innerHTML;
				$("#startdate").val(dateValue);
				var queryString = "ym="+yearandmonth+"&en="+$("#city").val()+"&do=price&fid="+$("#fid").val();
				$.ajax({
					type:"GET",
					url:"index.php?c=buy&m=cruise",
					data:queryString,
					success:function(msg){
						$("#price").val(decodeURI(msg));
					}
				});				
			}
			
			//获取年月  //不用
			function getSpanValue(id){
			var spanTest=document.getElementById(id);
				if (window.ActiveXObject){
					spanValue = spanTest.outerText; 
				}else{
					spanValue  = spanTest.textContent;
				}
				alert(spanValue);
				return spanValue;
			}
              function buy_cruise_steps_one_check(){
			  if($("#startdate").val()==''){
                    alert('start date is void!');
                    return false;
                }
                if($("#realname").val()=='Mr./Mrs./Ms.' || $("#realname").val()==''){
                    alert('Your name!');
                    return false;
                }
                if($("#nationality").val()==''){
                    alert('Your nationality is worring');
                    return false;
                }
				if($("#shipname").val()==''){
					alert('Please Do not XSS');
					return false;
				}
				if($("#phone").val()==''){
					alert('Your phone is bad!!!');
					return false;
				}
				if($("#email").val()==''){
					alert('email');
					return false;
				}
              }
			function CalQueryString(){
				var city = encodeURI($("#city").val());
				var yearandmonth = encodeURI($("#yearandmonth").val());
				var queryString = "ym="+yearandmonth+"&en="+city;
				return queryString;
			}
			
			function DateQueryString(){
				var yearandmonth = encodeURI($("#yearandmonth").val());
				var city = encodeURI($("#city").val());
				var queryString = "ym="+yearandmonth+"&en="+city;
				return queryString;
			}
			//根据星期修改日历可选内容
			function changeCal(){
				$.ajax({
					type:"GET",
					url:"index.php?c=buy&m=cruise",
					data:CalQueryString(),
					success:function(msg){
						//alert(msg);
						$("#cal").html(decodeURI(msg));
						$('#startdate').val('');
					}
				});
			}
			
			//上一年
			function prevyear(year){
				$.ajax({
						type:"GET",
						url:"index.php?c=buy&m=cruise",
						data:"ym="+year+"&en="+encodeURI($("#city").val()),
						success:function(msg){
							$("#cal").html(decodeURI(msg));
						}
					});
			}
			
			//下一年
			function nextyear(year){
				$.ajax({
						type:"GET",
						url:"index.php?c=buy&m=cruise",
						data:"ym="+year+"&en="+encodeURI($("#city").val()),
						success:function(msg){
							$("#cal").html(decodeURI(msg));
						}
					});
			}
			
			//上一个月
			function prevmonth(month){
				$.ajax({
						type:"GET",
						url:"index.php?c=buy&m=cruise",
						data:"ym="+month+"&en="+encodeURI($("#city").val()),
						success:function(msg){
							$("#cal").html(decodeURI(msg));
						}
					});
			}
			
			//下一个月
			function nextmonth(month){
				$.ajax({
						type:"GET",
						url:"index.php?c=buy&m=cruise",
						data:"ym="+month+"&en="+encodeURI($("#city").val()),
						success:function(msg){
							$("#cal").html(decodeURI(msg));
						}
					});
			}
			/*********************Contact**********************/
			function contactcheck(){
                if($('#name').val().length<2){
                    alert('Your name is bad');
                    return false;
                }
			if($('#email').val().length<2){
                    alert('Your email is bad');
                    return false;
                }
                if($('#request').val().length<2){
                    alert('Your request is bad');
                    return false;
                }
				if($('#secode').val().length<4){
                    alert('Your secode is bad');
                    return false;
                }
              }
			  /*********************Booking tour**********************/
			  function buy_tour_steps_one_check(){
              if($("#tourcode").val()==''){
                    alert('tourcode date is void!');
                    return false;
                }
                if($("#realname").val()=='Mr./Mrs./Ms.' || $("#realname").val()==''){
                    alert('Your name!');
                    return false;
                }
                if($("#nationality").val()==''){
                    alert('Your nationality is worring');
                    return false;
                }
				if($("#start_date").val()==''){
					alert('Please start_date');
					return false;
				}
				if($("#phone").val()==''){
					alert('Your phone is bad!!!');
					return false;
				}
				if($("#email").val()==''){
					alert('email');
					return false;
				}
			}